package com.unittec.drainage.provider.manage.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.unittec.drainage.provider.manage.entity.Region;
import com.unittec.drainage.provider.manage.entity.WaterheadUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author Jason
 * @date 2021/8/11
 */
public interface WaterheadUserMapper extends BaseMapper<WaterheadUser> {

    IPage<Map<String, Object>> getUserPage(Page<?> page, @Param(Constants.WRAPPER) LambdaQueryWrapper<?> ew);

    List<Map<String, Object>> getUserPage(@Param(Constants.WRAPPER) LambdaQueryWrapper<?> ew);

    List<Region> getRegionSonIds(@Param(Constants.WRAPPER) LambdaQueryWrapper<?> ew);

    /**
     * 用户未支付的记录数
     *
     * @param ew
     * @return
     */
    List<Map<String, Object>> getUserNotPay(@Param(Constants.WRAPPER) LambdaQueryWrapper<?> ew);

    List<String> getAllRegionById(@Param(Constants.WRAPPER) LambdaQueryWrapper<?> ew);
}